package com.rainng.coursesystem.service.student;

import com.rainng.coursesystem.model.vo.response.table.StudentExamItemVO;
import com.rainng.coursesystem.repository.StudentExamRepository;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ExamService {

    private final StudentExamRepository studentExamRepository;

    public ExamService(StudentExamRepository studentExamRepository) {
        this.studentExamRepository = studentExamRepository;
    }

    // 根据 studentId 获取学生的考试信息
    public List<StudentExamItemVO> getExamsByStudentId(Integer studentId) {
        return studentExamRepository.findExamsByStudentId(studentId);
    }
}
